package com.yanqu.road.server.cmd.activity.seacraftsouthsea;

import com.yanqu.road.pb.activity.SeacraftSouthSeaProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.activity.seacraftsouthsea.SeacraftSouthSeaMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

import java.util.List;

/**
 * @Description
 * @Author cwq
 * @Data 2022/2/12 14:20
 */
@Cmd(code = CrossProtocol.C2_SEACRAFT_SOUTH_SEA_GET_PROMOTION_UNION, desc = "海上争霸 南海丝路 向跨服索要晋级联盟数据")
public class CrossSeacraftSouthGetPromotionUnionCmd extends CrossUnionCommand {

    int activityId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        SeacraftSouthSeaProto.SeacraftSouthSeaGetPromotionUnionGameToCrossMsg gameToCrossMsg = SeacraftSouthSeaProto.SeacraftSouthSeaGetPromotionUnionGameToCrossMsg.parseFrom(packet.getBytes());
        activityId = gameToCrossMsg.getActivityId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        SeacraftSouthSeaMgr.getPromotionUnion(activityId, groupId, serverId);
    }

    @Override
    public void sendData() {

    }
}
